package study04;

import java.util.ArrayList;
import java.util.LinkedList;

public class Java04_fanxin {
    public static void main(String[] args) {
        ArrayList<Person4> list = new ArrayList();

        Person4 person = new Person4();
        User4 user = new User4();

//        class User4 extends Person4  继承了就可以放进来
        list.add(person);
        list.add(user);
        System.out.println(list);
    }
}

class Person4 {
    public void personFn () {
        System.out.println("personFn");
    }
}

class User4 extends Person4 {
    public void userFn () {
        System.out.println("userFn");
    }
}
